class: center, middle, inverse, title-slide # R & Rstudio ## an Introduction ### Fabio CRUZ ### Université de Lorraine ### 2021/02/01 (updated: 2021-01-29) --- # Learning outcomes At the end of this - You will have a first encounter with R & Rstudio software and its importance for open science - You will have a basic understanding of the main functions --- # Agenda of this sprint Two elements ### 1. Understanding the Rstudio ### 2. Data Visualization: an Intro --- # What is R project? <img src="https://www.r-project.org/Rlogo.png" alt="logo Rstudio" style="width:150px;" align="right"> R is a programming language and free software environment for statistical computing and graphics. .left-column[ - R’s mission is to enable the best and most thorough exploration of data possible . - It change the way people analyze, visualize, and manipulate data https://www.r-project.org/ ] .right-column[ <img src="data:image/png;base64,#img/R-project-00.jpg" width="80%" style="display: block; margin: auto;" /> Useful, but the interface is a little bit scary!.. ] --- # What is RStudio <img src="https://d33wubrfki0l68.cloudfront.net/57299a1dcd979c623325f11bf5e5ce60f3d4eb00/e4602/wp-content/uploads/2018/10/black.png" alt="logo Rstudio" style="width:150px;" align="right"> <img src="data:image/png;base64,#img/RStudio-00.jpg" width="70%" style="display: block; margin: auto;" /> RStudio is an integrated development environment (IDE) that provides an interface by adding many convenient features and tools. --- # R vs RStudio <img src="data:image/png;base64,#https://moderndive.netlify.app/images/shutterstock/R_vs_RStudio_1.png" width="90%" style="display: block; margin: auto;" /> --- class: middle center .assignment.infobox[ .Large[Hands on the workshop!.] The main goal is to create an Rstudio account, and to connect it with Github ] --- # Using Rstudio Cloud account (Recommended) .left-column[ 1. Sign up for Rstudio Cloud Free version: https://rstudio.cloud/ 2. Use you github account! 3. Voila!, C'est bon ] .right-column[ Image ] --- ## Rstudio Cloud account .infobox.important[ **RStudio Cloud is a webpage**, so no installation is required. However, as you have notice, there is some restrictions in the quantity of project and the virtual machine assigned to you. It's the best option to get start!] --- # Understanding Rstudio Interface .left-column[ ] --- # First is first: Console --- class: middle # Hands on the PC! --- # Primers with Rstudio .infobox.assignment[ **Objective** - This tutorial will learn you the basic skills to understand R languages. You will need in each analysis: how to inspect, visualize, subset, and transform your data, as well as how to **run code** with the basic functions. We'll concentrate our attention to this final element, How to **run code** and the basic functions. ] ## Timming: 20 Mins. <svg style="height:0.8em;top:.04em;position:relative;" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm57.1 350.1L224.9 294c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v137.7l63.5 46.2c5.4 3.9 6.5 11.4 2.6 16.8l-28.2 38.8c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg> --- # Hands on with Rstudio .left-column[ 1. Go to [this first this tutorial](https://rstudio.cloud/learn/primers/1.2) 2. Complete the tutorial 3. While you are completing, answers the questions . ] .right-column[ <img src="data:image/png;base64,#img/Rstudio-primers-00.jpg" width="80%" style="display: block; margin: auto;" /> ] --- class: middle center you finish?.. good! ## Take 5 min for coffe <svg style="height:0.8em;top:.04em;position:relative;" viewBox="0 0 640 512"><path d="M192 384h192c53 0 96-43 96-96h32c70.6 0 128-57.4 128-128S582.6 32 512 32H120c-13.3 0-24 10.7-24 24v232c0 53 43 96 96 96zM512 96c35.3 0 64 28.7 64 64s-28.7 64-64 64h-32V96h32zm47.7 384H48.3c-47.6 0-61-64-36-64h583.3c25 0 11.8 64-35.9 64z"/></svg> --- class: middle center # 2. Data Visualization ## An intro We are ba --- # What is data visualization --- ## Why is it important --- # Hands on with Rstudio .left-column[ 1. Go to [tutorial on Data Visualization basics](https://rstudio.cloud/learn/primers/1.1) 2. Complete the tutorial 3. While you are completing, answers the questions of section #2. ] .right-column[ <img src="data:image/png;base64,#img/Rstudio-primers-01.jpg" width="90%" style="display: block; margin: auto;" /> ] --- class: middle center Put the result of these first two elements on github! --- class: middle center you finish?.. good! ## Take 10 min for a luch <svg style="height:0.8em;top:.04em;position:relative;" viewBox="0 0 448 512"><path d="M350.85 129c25.97 4.67 47.27 18.67 63.92 42 14.65 20.67 24.64 46.67 29.96 78 4.67 28.67 4.32 57.33-1 86-7.99 47.33-23.97 87-47.94 119-28.64 38.67-64.59 58-107.87 58-10.66 0-22.3-3.33-34.96-10-8.66-5.33-18.31-8-28.97-8s-20.3 2.67-28.97 8c-12.66 6.67-24.3 10-34.96 10-43.28 0-79.23-19.33-107.87-58-23.97-32-39.95-71.67-47.94-119-5.32-28.67-5.67-57.33-1-86 5.32-31.33 15.31-57.33 29.96-78 16.65-23.33 37.95-37.33 63.92-42 15.98-2.67 37.95-.33 65.92 7 23.97 6.67 44.28 14.67 60.93 24 16.65-9.33 36.96-17.33 60.93-24 27.98-7.33 49.96-9.67 65.94-7zm-54.94-41c-9.32 8.67-21.65 15-36.96 19-10.66 3.33-22.3 5-34.96 5l-14.98-1c-1.33-9.33-1.33-20 0-32 2.67-24 10.32-42.33 22.97-55 9.32-8.67 21.65-15 36.96-19 10.66-3.33 22.3-5 34.96-5l14.98 1 1 15c0 12.67-1.67 24.33-4.99 35-3.99 15.33-10.31 27.67-18.98 37z"/></svg> ### Let's move to the other Sprint! ---